package com.fly_fox;

import com.fly_fox.dto.TaskGroupDto;
import com.fly_fox.entity.TaskItem;
import com.fly_fox.service.TaskItemService;
import com.fly_fox.util.JdbcUtil;
import com.fly_fox.util.PathUtils;

import java.nio.file.Path;

public class UseRead {

    public static void main(String[] args) {
        //  加载数据
        Path jdbcPath= PathUtils.getResPath("jdbc.properties");
        JdbcUtil.loadConfig(jdbcPath);

        TaskItemService service=new TaskItemService();
        service.loadDefaultDataYaml();
        TaskGroupDto dto = service.getGroupName("2022-06-10");
        TaskItem taskItem = service.random(dto);
        System.out.println("今日的复习分组为:"+dto.getTitle());
        System.out.println("今日的复习分组为:"+taskItem.getItemName());

    }

}
